package aatesting;

public class DecimalToBinary {

	public static String toBinary(int num)
	{
		String b="";
		int remainder;
		while(num>0)
		{
			remainder = num%2;
			b = Integer.toString(remainder) + b;
			num = num / 2;
		}
		return b;
	}
	
	public static void main(String args[])
	{
		String bin = DecimalToBinary.toBinary(291);
		System.out.println(bin);
	}
}
